package com.cy.ppj.model.domian.product;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import java.util.Date;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

/**
 * @description: 产品类型
 * @author: Ocean
 * @create: 2018-07-18 10:18
 **/
@Data
@Table(name = "t_product_type")
@ApiModel("产品类型")
public class ProductType {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "产品类型ID", required = true, example = "0")
    @NotNull(message = "数据异常")
    private Long id;

    @ApiModelProperty(value = "类型名称", required = true)
    @NotEmpty(message = "类型名称不可为空")
    private String name;
    
    /** 创建时间 */
    private Date createTime;

    /** 更新时间 */
    private Date updateTime;
}
